package com.huynhchihieu.domain;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the jobdetail database table.
 * 
 */
@Entity
@Table(name="jobdetail")
@NamedQuery(name="Jobdetail.findAll", query="SELECT j FROM Jobdetail j")
public class Jobdetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private JobdetailPK id;

	@Column(name="jobdetail_desc", length=45)
	private String jobdetailDesc;

	private int salary;

	//bi-directional many-to-one association to Job
	@ManyToOne
	@JoinColumn(name="jobId", nullable=false, insertable=false, updatable=false)
	private Job job;

	//bi-directional many-to-one association to Person
	@ManyToOne
	@JoinColumn(name="personId", nullable=false, insertable=false, updatable=false)
	private Person person;

	public Jobdetail() {
	}

	public JobdetailPK getId() {
		return this.id;
	}

	public void setId(JobdetailPK id) {
		this.id = id;
	}

	public String getJobdetailDesc() {
		return this.jobdetailDesc;
	}

	public void setJobdetailDesc(String jobdetailDesc) {
		this.jobdetailDesc = jobdetailDesc;
	}

	public int getSalary() {
		return this.salary;
	}

	public void setSalary(int salary) {
		this.salary = salary;
	}

	public Job getJob() {
		return this.job;
	}

	public void setJob(Job job) {
		this.job = job;
	}

	public Person getPerson() {
		return this.person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

}